home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 93 / CDMM_93_2.ISO / Project Nomads / nomads_demo_eng.exe / ARTEFACTTRANSFORMER.TCL < prev    next >
Encoding:
Text File  |  2002-04-19  |  3.8 KB  |  153 lines

  1. #
  2. #   Zustands-▄berwachungs-Script
  3. #   State Watch Script
  4. #
  5. #   Factory
  6. #
  7. #   created:    15-Jun-2000 Bernd
  8. #   
  9. #   (C) COPYRIGHT 2000 RADONLABS GMBH
  10. #
  11.  
  12. proc artefacttransformerwatch_normal {} {
  13.  
  14.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  15.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  16.     if {[.getartefactmode] == "false"} {
  17.         .announcestate house
  18.     } elseif {[.iscollected] == "true"} {
  19.         .announcestate backpack
  20.     } elseif {[.getcharges] <= 0} {
  21.         .setremoveable true
  22.     } elseif {[.getcreator] != "null"} {
  23.         .announcestate infactoryslot
  24.     }
  25. }
  26.  
  27. proc artefacttransformerwatch_infactoryslot {} {
  28.  
  29.     # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
  30.     # (in BackPack) oder gebaut (kein Artefakt mehr) wird 
  31.     if {[.getartefactmode] == "false"} {
  32.         .announcestate house
  33.     } elseif {[.iscollected] == "true"} {
  34.         .announcestate backpack
  35.     } elseif {[.getcharges] <= 0} {
  36.         .setremoveable true
  37.     } elseif {[.getcreator] == "null"} {
  38.         .announcestate normal
  39.     }
  40. }
  41.  
  42. proc artefacttransformerwatch_bauphase {} {
  43.  
  44.     # kann zerstoert oder wieder zusammengeklappt werden
  45.     if {[.iskilled] == "true"} {
  46.         .announcestate explode
  47.     } elseif {[.getartefactmode] == "true"} {
  48.         .announcestate normal
  49.     } elseif {[.isstatetimeover] == "true"} {
  50.         .announcestate house
  51.     }
  52. }
  53.  
  54.  
  55. proc artefacttransformerwatch_house {} {
  56.  
  57.     # kann zerstoert oder wieder zusammengeklappt werden
  58.     if {[.iskilled] == "true"} {
  59.         .announcestate explode
  60.     } elseif {[.getartefactmode] == "true"} {
  61.         .announcestate normal
  62.     } elseif {[.removebuilding] == "true"} {
  63.         .announcestate remove
  64.     } elseif {[.isdownanim] == "true"} {
  65.         .announcestate downanim
  66.     }
  67. }
  68.  
  69. proc artefacttransformerwatch_downanim {} {
  70.  
  71.     # kann zerstoert oder wieder zusammengeklappt werden
  72.     if {[.iskilled] == "true"} {
  73.         .announcestate explode
  74.     } elseif {[.isanimfinished] == "true"} {
  75.         .announcestate upanim
  76.     }
  77. }
  78.  
  79. proc artefacttransformerwatch_upanim {} {
  80.  
  81.     # kann zerstoert oder wieder zusammengeklappt werden
  82.     if {[.iskilled] == "true"} {
  83.         .announcestate explode
  84.     } elseif {[.isanimfinished] == "true"} {
  85.         .announcestate house
  86.     }
  87. }
  88.  
  89. proc artefacttransformerwatch_explode {} {
  90.  
  91.     # Uebergang zum Artefakt oder Wegnehmen
  92.     if {[.isanimfinished] == "true"} {
  93.         if {[.getcharges] <= 0} {
  94.             .setremoveable true
  95.         } else {
  96.             .announcestate normal
  97.         .removefromisland
  98.         }
  99.     }
  100. }
  101.  
  102. proc artefacttransformerwatch_remove {} {
  103.  
  104.     # Uebergang zum Artefakt oder Wegnehmen
  105.     if {[.isanimfinished] == "true"} {
  106.         if {[.getcharges] <= 0} {
  107.             .setremoveable true
  108.         } else {
  109.             .announcestate normal
  110.         .removefromisland
  111.         }
  112.     }
  113. }
  114.  
  115. proc artefacttransformerwatch_backpack {} {
  116.  
  117.     # Moeglich: usgeworfen (Nicht mehr "gesammelt") oder im
  118.     # Menue gezeigt (sichtbar)
  119.     if {[.iscollected] == "false"} {
  120.         .announcestate normal
  121.     } elseif {[.isvisible] == "true"} {
  122.         .announcestate menue
  123.     }
  124. }
  125.  
  126. proc artefacttransformerwatch_menu {} {
  127.  
  128.     if {[.isvisible] == "false"} {
  129.         .announcestate backpack
  130.     } elseif {[.getartefactuse] == "true"} {
  131.         .announcestate build
  132.     } elseif {[.iscollected] == "false"} {
  133.         .announcestate normal
  134.     }
  135. }
  136.  
  137. proc artefacttransformerwatch_build {} {
  138.  
  139.     if {[.iskilled] == "true"} {
  140.         .announcestate explode
  141.     } elseif {[.getartefactmode] == "false"} {
  142.         .announcestate bauphase
  143.     } elseif {[.getartefactuse] == "false"} {
  144.         .announcestate backpack
  145.     }
  146. }
  147.  
  148. proc artefacttransformerwatch_cinematic {} {
  149.  
  150.     # empty
  151. }    
  152.  
  153.